//
// function1.cpp for 204param in /home/morel_t//Rendu/maths/204param
// 
// Made by thomas morel
// Login   <morel_t@epitech.net>
// 
// Started on  Mon Mar 26 15:36:59 2012 thomas morel
// Last update Wed Mar 28 11:37:44 2012 thomas morel
//

#include	<cmath>
#include	"204param.hh"

double		function1(double x)
{
  if (x >= 2.f && x <= 5.f)
    return (1.f / 3.f);
  return (0.f);
}

double		function2(double x)
{
  if (x >= -1.f && x <= 1.f)
    return (1.f - fabs(x));
  return (0.f);
}

double		function3(double x)
{
  if (x > 0.f)
    return (exp(-x));
  return (0.f);
}

double		function4(double x)
{
  return ((1.f / sqrt(2.f * M_PI)) * exp(-(x * x) / 2.f));
}

double		function5(double x)
{
  return ((1.f / (2 * sqrt(2.f * M_PI))) * exp(-((x - 3) * (x - 3)) / 8.f));
}
